package com.atguigu.gmall.seckill.biz;

import com.atguigu.gmall.common.result.ResultCodeEnum;
import com.atguigu.gmall.model.mq.to.seckill.SeckillMsg;
import com.atguigu.gmall.model.order.vo.OrderConfirmVo;
import com.atguigu.gmall.model.seckill.entity.SeckillGoods;

import java.util.List;

public interface SeckillBizService {

    /**
     * 创建出当天要参与秒杀的所有商品
     * @return
     */
    List<SeckillGoods> getSecKillGoods();

    void upSeckillGoods();

    /**
     * 查询商品详情
     * @param skuId
     * @return
     */
    SeckillGoods getDetail(Long skuId);

    /**
     * 生成秒杀码
     * @param skuId
     * @return
     */
    String getSeckillSkuIdStr(Long skuId);

    ResultCodeEnum seckillOrder(Long skuId, String skuIdStr);

    void updateStock(SeckillMsg seckillMsg);

    ResultCodeEnum checkOrder(Long skuId);

    OrderConfirmVo geConfireOrder(String skuIdStr);
}
